<div class="layui-col-xs12">
    <div class="layui-btn-container layui-col-xs3">
        <button class="layui-btn" onclick="window.location.reload()"><i class="layui-icon">&#xe669;</i></button>
        {foreach $toolbardemo as $value}
        {if $value['type']=='alldel'}
        <button class="layui-btn layui-btn-danger demoTable {$value['class']}" style="{$value['style']}" lay-event="alldel" data-action="{$value['action']}">{$value['desc']|default="全部删除"}</button>
        {/if}

        {if $value['type']=='add'}
        <button class="layui-btn layui-btn-normal demoTable {$value['class']}" style="{$value['style']}" lay-event="add" data-action="{$value['action']}">{$value['desc']|default="添加"}</button>
        {/if}

        {if $value['type']=='back'}
        <button class="layui-btn layui-btn-normal demoTable {$value['class']}" style="{$value['style']}" lay-event="back" data-action="{$value['action']}">{$value['desc']|default="返回"}</button>
        {/if}

        {if $value['type']=='text'}
        <button class="layui-btn {$value['class']}" style="{$value['style']}">{$value['desc']|default="没设置"}</button>
        {/if}

        {if $value['type']=='export'}
        <button class="layui-btn demoTable {$value['class']}" style="{$value['style']}" lay-event="export" data-action="{$value['action']}">{$value['desc']|default="导出"}</button>
        {/if}

        {if $value['type']=='a'}
        <a href="{$value['action']}" class="layui-btn{$value['class']}" style="{$value['style']}">{$value['desc']|default="没设置"}</a>
        {/if}
        {/foreach}
    </div>
    {php}$xx = 0;{/php}
    {foreach $toolbardemo as $value}
    {if $value['type']=='search'}
    {php}$xx=1;{/php}
    <div class="layui-col-xs4">
        <div class="layui-row">
            <select id="sousuos" class="layui-select layui-col-xs2 demoTables" lay-event="xuanz" lay-ignore style="position: relative;bottom: 5px">
                <option value="">选择搜索</option>
                {foreach $value['option'] as $va}
                <option value="{$va['field']}">{$va['field_name']}</option>
                {/foreach}
            </select>
            <input class="layui-input layui-col-xs2" style="max-width: 300px;margin-left: 5px" name="tiaojian" id="sousuo" placeholder="搜索条件" type="text" value="">
            <button class="layui-btn demoTable layui-col-xs2" style="margin-left: 5px" lay-event="reload">{$value['desc']|default="搜索"}</button>
        </div>
    </div>
    {/if}
    {/foreach}
    {if $xx==0}
    <div class="layui-col-xs4"><img src="__STATIC__/admin/img/kongbai.jpg"></div>
    {/if}
    {foreach $toolbardemo as $value}
    {if $value['type']=='times'}
    <div class="layui-col-xs4 layui-col-xs-offset1">
        <select class="layui-col-xs2 layui-select" id="timefild" lay-ignore>
            <option value="">选择字段</option>
            {foreach $value['option'] as $va}
            <option value="{$va['field']}">{$va['field_name']}</option>
            {/foreach}
        </select>
        <div class="layui-col-xs2" style="margin-left: 4px">
            <input type="text" class="layui-input" id="time1">
        </div>
        <div class="layui-col-xs1" style="line-height: 38px;text-align: center">到</div>
        <div class="layui-col-xs2">
            <input type="text" class="layui-input" id="time2">
        </div>
        <div class="layui-col-xs1" style="margin-left: 5px"><button  class="layui-btn demoTable" lay-event="reload">{$value['desc']|default="确定"}</button></div>
    </div>
    {/if}
    {/foreach}
</div>